# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models

# Create your models here.
#coding: utf-8
from __future__ import unicode_literals

from django.db import models


from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Categroy(models.Model):
    id = models.IntegerField(primary_key=True)
    name = models.CharField(max_length=20)
    summary = models.CharField(max_length=50)
    status = models.IntegerField()
    remark = models.CharField(max_length=50, blank=True, null=True)
    create_user = models.IntegerField()
    create_time = models.DateTimeField()
    update_user = models.IntegerField()
    update_time = models.DateTimeField()

    def __str__(self):
        return self.name




    class Meta:
        managed = True
        db_table = 'categroy'


class Section(models.Model):
    id = models.IntegerField(primary_key=True)
    name = models.CharField(max_length=20)
    summary = models.CharField(max_length=50)
    videos_id = models.IntegerField()
    teachar_id = models.IntegerField()
    url = models.CharField(max_length=100)
    cover = models.CharField(max_length=100)
    hit = models.CharField(max_length=100)
    status = models.IntegerField()
    remark = models.CharField(max_length=50, blank=True, null=True)
    create_user = models.IntegerField()
    create_time = models.DateTimeField()
    update_user = models.IntegerField()
    update_time = models.DateTimeField()

    class Meta:
        managed = True
        db_table = 'section'


class Video(models.Model):
    id = models.IntegerField(primary_key=True)
    name = models.CharField(max_length=20)
    summary = models.CharField(max_length=50)
    category_id = models.IntegerField()
    status = models.IntegerField()
    remark = models.CharField(max_length=50, blank=True, null=True)
    create_user = models.IntegerField()
    create_time = models.DateTimeField()
    update_user = models.IntegerField()
    uodate_time = models.DateTimeField()

    class Meta:
        managed = True
        db_table = 'video'
